package www.test.method;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

import www.test.bean.ShipInfo;

public class classtest extends HttpServlet
{
	
	
	public static void main(String[] args) throws InstantiationException, IllegalAccessException, IntrospectionException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException
	{
		HttpServletRequest request = null ;
		Object bean = ShipInfo.class.newInstance();
		Field[] field =bean.getClass().getDeclaredFields();
		for(int i = 0 ; i< field.length ; i++)
		{
			String name = field[i].getName();
			field[i].set(bean, request.getParameter(name));
		}
	
		
	}
	
	
	

}
